package com.ubs.training.server.service;

import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * User: xubuntu
 * Date: 8/23/12
 * Time: 10:45 AM
 * To change this template use File | Settings | File Templates.
 */
@Component
@Scope(value = "session", proxyMode = ScopedProxyMode.INTERFACES)
public class ActivityCounterImpl implements ActivityCounter {
    int counterValue = 0;

    @Override
    public void trackActivity() {
        counterValue++;
    }

    @Override
    public int getActivityCounter() {
        return counterValue;
    }
}
